﻿@model IEnumerable<AlmaDatabase.Shop>

@{
    ViewContext.Controller.ViewBag.Breadcrumb.Enter("Mon profil", "Edit", "User", new { id = Session["UserId"] });
    ViewContext.Controller.ViewBag.Breadcrumb.Enter("Mes magasins");
    ViewBag.Title = "IndexByUserId";
}

<h2>Mes magasins</h2>

<p>
    @Html.ActionLink("Creer un nouveau magasin", "Create", "Shop")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Nom du magasin
        </th>
        <th>
            Email
        </th>
        <th>
            Telephone
        </th>
        <th>
            Fax
        </th>
        <th>
            Adresse
        </th>
        <th>
            Code Postal
        </th>
        <th>
            Ville
        </th>
        <th>
            Pays
        </th>
       @* <th>
            Produits
        </th>  *@
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Editer", "Edit", new { id=item.ID }) |
@*            @Html.ActionLink("Details", "Details", new { id=item.ID }) |*@
           @Html.ActionLink("Supprimer", "Delete", new { id=item.ID })
        </td>
        <td>
            @item.Name
        </td>
        <td>
            @item.Email
        </td>
        <td>
            @item.Phone
        </td>
        <td>
            @item.Fax
        </td>
        <td>
            @item.Address
        </td>
        <td>
            @item.Zipcode
        </td>
        <td>
            @item.Town
        </td>
        <td>
            @item.Country
        </td>
      @*  <td>
            @Html.ActionLink("Voir", "IndexByShopId", new { controller = "Product", shopId = item.ID })
        </td>*@
    </tr>
}

</table>
<p>
    @Html.ActionLink("Retourner au profil", "Edit", "User", new { id = Session["UserId"] }, null)
</p>

